package com.imooc.miaosha.dao;

import com.imooc.miaosha.pojo.Shipping;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component("shippingMapper")
public interface ShippingMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Shipping record);

    int insertSelective(Shipping record);

    Shipping selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Shipping record);

    int updateByPrimaryKey(Shipping record);

    List<Shipping> listShippingByUserId(Long userId);

    int countShippingAndUserId(@Param("userId") Long userId, @Param("shippingId") Long shppingId);

    int deleteShippingByUserIdAndShippingId(@Param("shippingId")Long shippingId,@Param("userId")Long userId);
}